<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> 
<script type="text/javascript">
function movePage(pageNo){
	//window.location='?pageNo='+pageNo+param();
	$.get("myFocusPosition.do?pageNo="+pageNo+param() + "&"+Math.random(), function(data) {
		$("#main").html(data);
	});
}
function param(){
	var param="";
	if($("#name").val()!="")
		param+='&name='+$("#name").val();
	if($("#region").val()!="")
		param+='&region='+$("#region").val();
	if($("#detail").val()!="")
		param+='&detail='+$("#detail").val();
	return param;
}
$(document).ready(function() {
		$.get("getSelect.do",{type:'2',index:'${param.sex}'}, function(data){$("select#sex").append(data);});
		$.get("getSelect.do",{type:'1',code:null,index:'${param.region}'}, function(data){$("select#region").append(data);});
		$.get("getSelect.do",{type:'3',index:'${param.degree}'}, function(data){$("select#degree").append(data);});
		$.get("getSelect.do",{type:'5',index:'${param.workType}'}, function(data){$("select#workType").append(data);});
		$.get("getSelect.do",{type:'zw',index:'${param.name}',code:null}, function(data){$("select#name").append(data);});
		$("#search").button().click(function() {
			movePage(1);
		});
	});
</script>
<div class="search">
	<label>职位</label><select id="name" ><option value=""></option></select>
	<label>区域</label><select id="region"><option value=""></option></select>
	<label>内容</label><input type="text" id="detail" value="${param.detail }"/>
	<button id="search">查询</button>
</div>
<table>
	<thead>
	<tr>
		<td>序号</td>
		<td>公司</td>
		<td>职位名称</td>
		<td>区域</td>
		<td>性别</td>
		<td>工资</td>
		<td>是否兼职</td>
		<td>人数</td>
		<td>有效期</td>
	</tr>
	</thead>
	<tbody>
	<c:forEach var="e" items="${o.dataList}" varStatus="s">
	<tr>
		<th>${s.index+1 }</th>
		<td><a href="showCompany.do?id=${e.companyID }" target="_blank">${e.company }</a></td>
		<td><a href="viewPosition.do?id=${e.id }" target="_blank">${e.name }</a></td>
		<td>${e.region }</td>
		<td>${e.sex }</td>
		<td>${e.wages }</td>
		<td>${e.workType }</td>
		<td>${e.persons }</td>
		<td>${e.days }</td>
	</tr>
	</c:forEach>
	</tbody>
	<tfoot><tr><td colspan="7">${o.pageNav }</td></tr></tfoot>
</table>